#ifndef KEYPAD_H
#define KEYPAD_H

#include <QGraphicsRectItem>
#include <QImage>
#include <QPainter>
#include <QGraphicsProxyWidget>
#include <QGraphicsDropShadowEffect>

class Keypad: public QObject, public QGraphicsRectItem
{
    Q_OBJECT
    Q_PROPERTY(qreal scale READ scale WRITE setScale)
public:
    bool visible;
    Keypad();
    void changeStatus();
    int isSelected();

signals:
    void tecla1Clicked();
    void tecla2Clicked();
    void tecla3Clicked();
    void tecla4Clicked();
    void tecla5Clicked();
    void tecla6Clicked();
    void tecla7Clicked();
    void tecla8Clicked();
    void tecla9Clicked();

protected:
    void paint( QPainter *, const QStyleOptionGraphicsItem *option, QWidget *widget );
    void mousePressEvent(QGraphicsSceneMouseEvent *event);
    void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);

private:
    QImage *keypad_img, *minimize_icon, *button_border;
    QRectF *button1, *button2, *button3, *button4, *button5, *button6, *button7, *button8, *button9;
    QRectF *selected_button;
    int selected;
    float itemScale;
    QGraphicsDropShadowEffect *DropShadow;
    QString *img_path;
};

#endif // KEYPAD_H
